{% import "@WebsiteBundle/macros/pagination.html.twig" as macros %}
{% if list %}
	{% for item in list %}
		<div class="col-sm-12 col-lg-4">
			<div class="card">
				<div class="img-responsive img-responsive-21x9 card-img-top" style="background-image: url({{ json_get(item['goodsSmallImg']) }})"></div>
				<div class="card-body">
					<h3 class="card-title">
						<a href="{{ path('app_course_detail', {'id':item['id']}) }}" class="stretched-link text-truncate">{{ item['name'] }}</a>
					</h3>
					{% if item['tagsArr'] %}
						<div class="text-muted">
							{% for item in item['tagsArr'] %}
								<span class="status status-azure">{{ item }}</span>
							{% endfor %}
						</div>
					{% endif %}
				</div>
				<div class="card-body">
					<div class="hstack">
						<div class="p-2">{{ item['courseCount'] }}次课共{{ item['courseHour'] }}小时</div>
						<div class="p-2 ms-auto">{{ item['buyNumberView'] }}人报名</div>
						<div class="p-2 ms-auto">
							{% if item['shopPrice'] >0 %}
								<span class="badge bg-red">¥{{ item['shopPriceView'] }}</span>
							{% else %}
								<span class="badge bg-teal">免费</span>
							{% endif %}
						</div>
					</div>
				</div>
			</div>
		</div>
	{% endfor %}
	<div class="col-sm-12 col-lg-12 pagination ">
		{{ macros.pagination(pagination) }}
	</div>
{% else %}
	{{ include('@WebsiteBundle/empty.html.twig',{msg:'搜索结果为空!'}) }}
{% endif %}
